// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.SQLUtils;
// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.statement.SQLExplainStatement;
// import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;
#include "OracleExplainStatement.h"
#include "../../../../../DbType.h"
#include "../../../../SQLUtils.h"
#include "../../../../ast/SQLExpr.h"
#include "../../visitor/OracleASTVisitor.h"
#include "../../../../visitor/SQLASTVisitor.h"

OracleExplainStatement::OracleExplainStatement()
    : SQLExplainStatement(DbType_ptr(new DbType(&DbType::oracle)))
{
}

// @Override
void OracleExplainStatement::accept0(OracleASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(OracleExplainStatement)))
  {
    acceptChild(visitor, statementId);
    acceptChild(visitor, into);
    acceptChild(visitor, statement);
  }
  visitor->endVisit(SharedObject(OracleExplainStatement));
}

void OracleExplainStatement::accept0(SQLASTVisitor_ptr visitor)
{
  accept0(std::dynamic_pointer_cast<OracleASTVisitor>(visitor));
}

string_ptr OracleExplainStatement::toString()
{
  return SQLUtils::toOracleString(SharedObject(OracleExplainStatement));
}

SQLExpr_ptr OracleExplainStatement::getStatementId()
{
  return statementId;
}

void OracleExplainStatement::setStatementId(SQLExpr_ptr statementId)
{
  this->statementId = statementId;
}

SQLExpr_ptr OracleExplainStatement::getInto()
{
  return into;
}

void OracleExplainStatement::setInto(SQLExpr_ptr into)
{
  this->into = into;
}
